//
//  MLRetweet.swift
//  MLSina20160624
//
//  Created by manmanlang on 16/6/29.
//  Copyright © 2016年 manmanlang. All rights reserved.
//

import UIKit

let StautsMargin:CGFloat = 10
class MLRetweet: UIView {

    var weibo: MLWeiboData?{
        didSet{
            contentLabel.text = weibo?.retweeted_status?.text
        }
    }
    
    override init(frame: CGRect) {
        super.init(frame: frame)
        setupUI()
    }
    
    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    
    private func setupUI(){
        backgroundColor = RBG(237, green: 237, blue: 237)
        
        addSubview(contentLabel)
        
        contentLabel.snp_makeConstraints { (make) -> Void in
            make.leading.equalTo(self).offset(StautsMargin)
            make.top.equalTo(self).offset(StautsMargin)
        }
        
        self.snp_makeConstraints { (make) -> Void in
            make.bottom.equalTo(contentLabel).offset(StautsMargin)
        }
    }
    
    
    private lazy var contentLabel: UILabel = UILabel(textColor: UIColor.darkGrayColor(), textFont: 15, maxWidth: UIScreen_Bounds_Width - StautsMargin * 2)

}
